package com.bidevalution.controller.api;

import com.bidevalution.service.BidParamService;
import com.bidevalution.service.BidResultService;
import com.bidevalution.service.EntInfoService;
import com.bidevalution.service.TbFileService;
import com.qtp.core.model.Response;
import lombok.extern.log4j.Log4j2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author huyiqi
 * @date 2019/11/21
 */
@RestController
@RequestMapping("/testController")
public class TestController {

    private static final Logger log = LoggerFactory.getLogger(TestController.class);

    @RequestMapping(value = "/testEnpriseCheck")
    @ResponseBody
    public Response<String> testEnpriseCheck(@RequestParam("sectionCode") String sectionCode) {
        try {
            return entInfoService.getEnpriseCheck(sectionCode);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return Response.fail(e.getMessage());
        }
    }

    @RequestMapping(value = "/testTbDeposit")
    @ResponseBody
    public Response<String> testTbDeposit(@RequestParam("sectionCode") String sectionCode) {
        try {
            return entInfoService.getTbDeposit(sectionCode);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return Response.fail(e.getMessage());
        }
    }



    @Autowired
    private EntInfoService entInfoService;

    @Autowired
    private BidParamService bidParamService;

    @Autowired
    private TbFileService tbFileService;

    @Autowired
    private BidResultService bidResultService;
}
